package com.station.controller;

import com.station.entity.CommonPayRecord;
import com.station.service.CommonPayRecordService;
import com.station.utils.R;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;

@RestController
@RequestMapping("scanCodePay")
public class ScanCodePayController {
    /**
     * 日志对象
     */
    private static Logger log = LoggerFactory.getLogger(ScanCodePayController.class);


    @Autowired
    private CommonPayRecordService commonPayRecordService;



    @RequestMapping("/list")
    public R list() {
       CommonPayRecord commonPayRecord = commonPayRecordService.list().get(0);
        HashMap<String, Object> hashMap = new HashMap<>();
        hashMap.put("commonPayRecord",commonPayRecord);
        return R.ok(hashMap);
    }

}
